<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册-考拉海购</title>
    <link rel="stylesheet" href="css/other.css">

</head>
<body>
    <div id="zc_header_wrap">
    <div id="zc_header">
        <div class="zc_header_left"></div>
        <div class="zc_header_right"></div>

    </div>
</div>
    <div id="zc_contain">
        <div class="zc_contain_one"></div>
        <div class="zc_contain_two">
            <h2>手机号注册</h2>
            <input type="text" placeholder="请输入正确的手机号">
            <input type="password" placeholder="请输入密码">
            <input type="button" value="同意协议并注册" id="zc_btn">
            <span> <ul></ul></span>
        </div>
    </div>
    <div id="dl_footer">
        <div id="footer">
            <div id="footer_three_four_wrap">
                <div class="footer_three">
                    <div class="footer_three_one">
                        <span>增值电信业务经营许可证：浙B2-20160288</span>
                        <span>（浙）网械平台备字[2018]第00007号</span>
                        <span>阿里巴巴版权所有©2003-2021</span>
                        <span><a href="">隐私政策</a>
                            <span>-</span>
                            <a href="">考拉海购</a></span>
                    </div>
                    <div class="footer_three_two">
                        <span>网络文化经营许可证：浙网文（2020）4340-180号</span>
                        <span>浙江省网络食品销售第三方平台提供者备案：浙网食A33010006</span>
                    </div>
                    <div class="footer_three_three">
                        <a href=""><img src="img/footer/ga.png" alt=""></a>
                        <a>浙公网安备 33010802002216号</a>
                        <a href="">互联网药品信息服务资格证书编号（浙）-2017-0027</a>
                        <a href="">浙ICP备16011229号</a>
                        <a href="">自营经营者信息</a>
                    </div>

                    <div class="footer_three_four">
                        <span><img src="img/footer/flast2.png" alt=""></span>
                        <b><img src="img/footer/flast1.png" alt=""></b>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <script src="js/ajax.js"></script>
    <script>
      let oInput=document.querySelectorAll("input");
       oInput[2].onclick=function(){
           let user=oInput[0].value
           let paw=oInput[1].value
           ajax({
               method:"get",
               url:`http://jx.xuzhixiang.top/ap/api/reg.php`,
               params: {
                   username:user,
                 password:paw
                },
                success(obj){
                    alert(obj.msg)
                    if(obj.code==1){
                    location.href="login.html"

                }
                }
           })
       }
    </script>

</body>
</html>